package com.ijunfu.spring.bean_configuration._01_bean_component.config;

import com.ijunfu.spring.bean_configuration._01_bean_component.service.RoleService;
import com.ijunfu.spring.bean_configuration._01_bean_component.service.UserService;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

/**
 *
 * @Title  : 
 * @Author : ijunfu <ijunfu@163.com>
 * @Date   : 2023/11/3 22:24
 * @Version: 1.0
 * @Motto  : 世界很大 世界很小
 *
 */
@Configuration
public class MyConfig {

    @Bean
    public UserService userService() {
        return new UserService();
    }

    @Bean
    public RoleService roleService() {
        System.out.println(userService());
        System.out.println(userService());
        return new RoleService();
    }
}
